<?php
use think\facade\Route;

Route::any('/', function(){  return '<div>欢迎光临！</div>';   });  

Route::group('user', function(){
 	Route::any('detail/:id','v1.User/detail')->model('id','\app\models\user\User');
})->allowCrossDomain();

//基础
Route::group('soft', function(){
	//登录相关
	Route::group('auth', function(){
		Route::post('pwdLogin','soft.Auth/pwdLogin');
		Route::post('refreshToken','soft.Auth/refreshToken');
		Route::post('logout','soft.Auth/logout');
	});
	//地址坐标，ip相关
	Route::group('map', function(){
		Route::get('getAddress','soft.Map/getAddress');
	});
	//短信相关
	Route::group('sms', function(){
		Route::post('sendCode','soft.Sms/sendCode');
		Route::post('verifiCode','soft.Sms/verifiCode');
	});
	//上传相关
	Route::group('upload', function(){
		Route::post('upload','soft.Upload/upload');
		Route::post('deleteFile','soft.Upload/deleteFile');
	});
})->allowCrossDomain();
	

